package com.ruoyi.repairCar.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.repairCar.mapper.RescueRecordMapper;
import com.ruoyi.repairCar.domain.RescueRecord;
import com.ruoyi.repairCar.service.IRescueRecordService;

/**
 * 救援记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-21
 */
@Service
public class RescueRecordServiceImpl implements IRescueRecordService 
{
    @Autowired
    private RescueRecordMapper rescueRecordMapper;

    /**
     * 查询救援记录
     * 
     * @param rescueRecordId 救援记录主键
     * @return 救援记录
     */
    @Override
    public RescueRecord selectRescueRecordByRescueRecordId(Long rescueRecordId)
    {
        return rescueRecordMapper.selectRescueRecordByRescueRecordId(rescueRecordId);
    }

    /**
     * 查询救援记录列表
     * 
     * @param rescueRecord 救援记录
     * @return 救援记录
     */
    @Override
    public List<RescueRecord> selectRescueRecordList(RescueRecord rescueRecord)
    {
        return rescueRecordMapper.selectRescueRecordList(rescueRecord);
    }

    /**
     * 新增救援记录
     * 
     * @param rescueRecord 救援记录
     * @return 结果
     */
    @Override
    public int insertRescueRecord(RescueRecord rescueRecord)
    {
        return rescueRecordMapper.insertRescueRecord(rescueRecord);
    }

    /**
     * 修改救援记录
     * 
     * @param rescueRecord 救援记录
     * @return 结果
     */
    @Override
    public int updateRescueRecord(RescueRecord rescueRecord)
    {
        return rescueRecordMapper.updateRescueRecord(rescueRecord);
    }

    /**
     * 批量删除救援记录
     * 
     * @param rescueRecordIds 需要删除的救援记录主键
     * @return 结果
     */
    @Override
    public int deleteRescueRecordByRescueRecordIds(Long[] rescueRecordIds)
    {
        return rescueRecordMapper.deleteRescueRecordByRescueRecordIds(rescueRecordIds);
    }

    /**
     * 删除救援记录信息
     * 
     * @param rescueRecordId 救援记录主键
     * @return 结果
     */
    @Override
    public int deleteRescueRecordByRescueRecordId(Long rescueRecordId)
    {
        return rescueRecordMapper.deleteRescueRecordByRescueRecordId(rescueRecordId);
    }
}
